<!--********************************************************************
* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title data-i18n="resources.title_translation"></title>
    <style type="text/css">
        .editPane {
            position: absolute;
            right: 50px;
            top: 50px;
            text-align: center;
            background: #FFF;
            z-index: 1000;
        }
    </style>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div class='panel panel-primary editPane' id='editPane' style="z-index: 99999">
    <div class='panel-heading'>
        <h5 class='panel-title text-center' data-i18n="resources.text_translation"></h5>
    </div>
    <div class='panel-body' id='params'>
        <p></p>
        <div align='right' class='button-group'>
            <input type='button' id='btn1' class='btn btn-primary' data-i18n="[value]resources.btn_enlarge" onclick="mapenlarge()"/>
            <input type='button' id='btn2' class='btn btn-primary' data-i18n="[value]resources.btn_lessen" onclick="mapreduce()"/>
            <input type='button' id='btn3' class='btn btn-primary' data-i18n="[value]resources.btn_translation" onclick="mapPan()"/>
        </div>
    </div>
</div>
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" include="bootstrap" src="../js/include-web.js"></script>
<script type="text/javascript" exclude="iclient-classic" src="../../dist/classic/include-classic.js"></script>
<script type="text/javascript">
    var map, layer,
        host = window.isLocal ? window.server : "http://support.supermap.com.cn:8090",
        url = host + "/iserver/services/map-world/rest/maps/World";
    map = new SuperMap.Map("map", {controls: []});
    layer = new SuperMap.Layer.TiledDynamicRESTLayer("World", url, {
        transparent: true,
        cacheEnabled: true
    }, {maxResolution: "auto"});
    layer.events.on({"layerInitialized": addLayer});


    function addLayer() {
        map.addLayer(layer);
        map.setCenter(new SuperMap.LonLat(0, 0), 0);
    }
    //放大 ，在当前缩放级别的基础上放大一级。
    function mapenlarge() {
        map.zoomIn();
    }
    //缩小，在当前缩放级别的基础上缩小一级。
    function mapreduce() {
        map.zoomOut();
    }
    //平移 ，根据指定的屏幕像素（-20，-8）值平移地图
    function mapPan() {
        map.pan(-20, -8);
    }
</script>

</body>
</html>